package com.eclab.security.core.validate.code.image;

import com.eclab.security.core.validate.code.ValidateCode;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

/**
 * 描述:
 * 图形验证码
 * @author yd
 * @create 2019-01-20 20:52
 */
public class ImageCode extends ValidateCode {

    private BufferedImage image;

    private String code;

    private LocalDateTime expireTime;

    /**
     * 多少秒内过期
     * @param image
     * @param code
     * @param expireIn
     */
    public ImageCode(BufferedImage image, String code, int expireIn) {
        super(code,expireIn);
        this.image = image;
    }

    /**
     * 某个时间点过期
     * @param image
     * @param code
     * @param expireTime
     */
    public ImageCode(BufferedImage image, String code, LocalDateTime expireTime) {
        super(code,expireTime);
        this.image = image;
    }

    public BufferedImage getImage() {
        return image;
    }

    public void setImage(BufferedImage image) {
        this.image = image;
    }





}
